package cn.cheln.explorer.util;

import android.os.Environment;
import android.os.StatFs;
import android.widget.TextView;
import cn.cheln.explorer.beans.FileUtil;
import java.io.File;
import java.util.Map;

public class ReadSystemMemory
{
  public static Map blockSizeMap;
  TextView tv = null;

  public static Long getAvailableExternalMemorySize()
  {
    StatFs localStatFs = new StatFs(Environment.getExternalStorageDirectory().getPath());
    return Long.valueOf(localStatFs.getBlockSize() * localStatFs.getAvailableBlocks());
  }

  public static Long getAvailableInternalMemorySize()
  {
    StatFs localStatFs = new StatFs(Environment.getDataDirectory().getPath());
    return Long.valueOf(localStatFs.getBlockSize() * localStatFs.getAvailableBlocks());
  }

  public static String getAvailableInternalMemorySizeText()
  {
    return FileUtil.formatSize((float)getAvailableInternalMemorySize().longValue());
  }

  public static Map getBlockSizeMap(String paramString)
  {
    if (blockSizeMap == null)
      blockSizeMap = FileUtil.getAvailableStore(paramString);
    return blockSizeMap;
  }

  public static Long getTotalInternalMemorySize()
  {
    StatFs localStatFs = new StatFs(Environment.getDataDirectory().getPath());
    return Long.valueOf(localStatFs.getBlockSize() * localStatFs.getBlockCount());
  }

  public static String getTotalMemoryText()
  {
    return FileUtil.formatSize((float)getTotalInternalMemorySize().longValue());
  }
}

/* Location:           H:\360云盘\lewa_explorer_3.0\bin\FileApp_orig_dex2jar.jar
 * Qualified Name:     cn.cheln.explorer.util.ReadSystemMemory
 * JD-Core Version:    0.5.2
 */